﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace AJWPFAdmin.Services.Migrations
{
    /// <inheritdoc />
    public partial class 车辆和台账记录表新增字段 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "PermittedTowingWeight",
                table: "ShippingRecords",
                type: "varchar(20)",
                maxLength: 20,
                nullable: true,
                comment: "准牵引总质量")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "VerifiedLoadWeight",
                table: "ShippingRecords",
                type: "varchar(20)",
                maxLength: 20,
                nullable: true,
                comment: "核定载重质量")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "PermittedTowingWeight",
                table: "Cars",
                type: "varchar(20)",
                maxLength: 20,
                nullable: true,
                comment: "准牵引总质量")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "VerifiedLoadWeight",
                table: "Cars",
                type: "varchar(20)",
                maxLength: 20,
                nullable: true,
                comment: "核定载重质量")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 1L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 26, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 2L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 26, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 3L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 26, 0, 0, 0, 0, DateTimeKind.Unspecified));
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "PermittedTowingWeight",
                table: "ShippingRecords");

            migrationBuilder.DropColumn(
                name: "VerifiedLoadWeight",
                table: "ShippingRecords");

            migrationBuilder.DropColumn(
                name: "PermittedTowingWeight",
                table: "Cars");

            migrationBuilder.DropColumn(
                name: "VerifiedLoadWeight",
                table: "Cars");

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 1L,
                column: "CreateDate",
                value: new DateTime(2025, 4, 14, 14, 59, 46, 464, DateTimeKind.Local).AddTicks(5995));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 2L,
                column: "CreateDate",
                value: new DateTime(2025, 4, 14, 14, 59, 46, 464, DateTimeKind.Local).AddTicks(6075));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 3L,
                column: "CreateDate",
                value: new DateTime(2025, 4, 14, 14, 59, 46, 464, DateTimeKind.Local).AddTicks(6111));
        }
    }
}
